// dlg.txt

//mark_quest_dest(zone,x,y,layer,quest);
//	code =
//		sf(,,2);
//		toggle_quest(19,10);
//		award_party_xp(MED_QUEST_XP);
//	break;

begintalkscript;

variables;

short this_town = 9;

begintalknode;
	tag = 1;
	condition = get_sdf(this_town,1) == 0;
	text1 = "You are at the base of Spiretop Lighthouse. The tower is at the top of the hill above you. A light still emerges from its windows, playing along the ocean surface to the east.";
	text2 = "The lighthouse is powered by advanced magic. It is a gift from Haven, and it protects your ships as they travel along the coast.";
	text3 = "Not far ahead, you can see one of your scouts. He kneels behind a wagon, looking up at the tower.";
	code =
		sf(this_town,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(this_town,2) == 0;
	text1 = "The interior of the lighthouse stinks. You smell spilled wine, rotting food, and the blood of the Rokaj defenders killed here. Also, the reek of ka-wolves.";
	text2 = "In the hall to the north, you hear snarling and furniture being smashed, occasionally broken up with incoherent squibs of speech. _Well met, friend._ _The sun is high._ _Spare me a copper._ _I am a friend._";
	text3 = "Must be ka-wolves. Several of them.";
	code =
		sf(this_town,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(this_town,3) == 0;
	text1 = "About Missions:";
	text2 = "You will receive a lot of missions in Queen's Wish. Completing them is how you will get most of your treasure and experience.";
	text3 = "Missions usually need to be completed in one attempt. If you kill some enemies and return, your foe will have reinforcements.";
	text4 = "Not all battles must be fought. Some enemies will be off to the side and can be passed. However, these foes give extra experience and treasure.";
	text5 = "When you have completed a mission and leave the area, the remaining foes will leave and take their treasure with them. If you want their bonus loot, you must kill them in one single, triumphant run.";
	code =
		sf(this_town,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(this_town,4) == 0;
	text1 = "When you round the corner, you see two Rokaj warriors, young, fierce, and part of the same massive raid that tried to kill you.";
	text2 = "You expect them to mindlessly attack. They are Rokaj, after all. Instead, they run to the south. No doubt to meet up with their fellows and form a defense. The Ro are fierce, but they are deadly cunning as well.";
	code =
		sf(this_town,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(this_town,5) == 0;
	text1 = "You enter the highest chamber of the lighthouse. An enormous crystal sits on a podium. It shoots out constant beams of light through the windows to the south and east. Haven's magical engineering at its finest.";
	text2 = "There is probably plenty of valuable loot to be stolen here. The Rokaj took too long to steal it, though. They did not expect a speedy, decisive response to their attack.";
	code =
		sf(this_town,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(this_town,6) == 0;
	text1 = "__";
	code =
		sf(this_town,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(this_town,7) == 0;
	text1 = "__";
	code =
		sf(this_town,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(this_town,8) == 0;
	text1 = "__";
	code =
		sf(this_town,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(this_town,9) == 0;
	text1 = "__";
	code =
		sf(this_town,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(this_town,10) == 0;
	text1 = "__";
	code =
		sf(this_town,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(this_town,11) == 0;
	text1 = "__";
	code =
		sf(this_town,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(this_town,12) == 0;
	text1 = "__";
	code =
		sf(this_town,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The door is barred from the inside.";

begintalknode;
	tag = 14;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

//// Salatan

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "The scout is hiding behind a wagon, watching the lighthouse. You sneak up next to him. He quickly turns his head to look at you. Then he looks at you again, more intently.";
	text2 = "_Well met. I am Scout Salatan. And you ... Are you the [P]?_";
	text3 = "Scout Salatan has already given his full report. He is fleeing to safety.";
	action = DEP_ON_SDF 9 12 0;

		
begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(9,12) > 0;
	question = "Watch him go.";
	text1 = "He heads back to the safety of [F0], kindly leaving all of the opportunities for glory and heroism to you.";
	action = END_TALK;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(9,12) == 0;
	question = "_Yes. Give me your report._";
	text1 = "_Really? Oh, I'm sorry._ He tries to stand up to bow to you. You grab him and haul him down before he gets seen. _I've only been here an hour, but I got a good look._";
	code =
		sf(9,12,1);
	break;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(9,12) == 0;
	question = "_No. We're just similar. Give me your report._";
	text1 = "_Really? Oh._ He doesn't believe you, but he pretends. _Glad for reinforcements. I've only been here an hour, but I got a good look._";
	code =
		sf(9,12,1);
	break;

begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(9,12) == 0;
	question = "_Never mind that. What is happening?_";
	text1 = "He gives you another long look. Then he shrugs and looks back up at the tower. _Fair enough. I've only been here an hour, but I got a good look._";
	code =
		sf(9,12,1);
	break;

begintalknode;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "_What have you seen?_";
	text1 = "_Raiders are here. Not many. A few are by the docks, at the far end. The rest are in the tower. Mostly ka-wolves, running around and breaking things. I know there are humans in there, but I haven't seen them._";

begintalknode;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "_Good. You can help me with the assault._";
	text1 = "_Um, I'm sorry. I know I should obey you. I got my orders from Prince Sutter, though. I have to return my report to him._";

begintalknode;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "_Anything else?_";
	text1 = "_No. That is all. My orders are to return with what I have learned._ He starts to rise, but then he pauses.";
	text2 = "_I'm sorry, [P], but I have to ask. This shouldn't be work for royalty. Why are you here?_";

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_Sutter said._";
	text1 = "He chuckles quietly. _So we have something in common. Good hunting, [P]._ He salutes and slips off to the west.";
	action = END_TALK;

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_Royalty of Haven fights alongside its soldiers. It is our way._";
	text1 = "_It is an honor to fight for Haven. Let's teach those robbers a lesson._ He salutes and slips off to the west.";
	action = END_TALK;

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_It's just a more exciting form of hunting._";
	text1 = "He grins. _That's the spirit! Good hunting, [P]!_ He salutes and slips off to the west.";
	action = END_TALK;

begintalknode;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "_I really wish I knew._";
	text1 = "Salatan is a little confused, but he takes it as a joke. _Well, it keeps things from being too boring, anyway. Good fortune to you._ He salutes and slips off to the west.";
	action = END_TALK;

	
// Rezna

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "At last, you confront the real raiders, the Rokaj warriors who came here to take Haven's lighthouse. Their leader steps forward to face you. He is a young man, younger than you. He holds a long, curved blade in a trembling hand.";
	text2 = "He clearly means to utter some sort of defiant challenge. When he opens his mouth, however, only a soft choking sound comes out.";
	code =
		sf(9,13,1);
		set_attitude(30003,10);
		set_dialogue_pic(839);
	break;
	
begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_What are you doing here?_";
	text1 = "He only watches you. He stops trying to talk. None of his companions say anything either. They concentrate on gathering their courage for what has to come.";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_You raiders tried to kill a [P] of Haven. Your life is mine._";
	text1 = "He only watches you. He stops trying to talk. None of his companions say anything either. They concentrate on gathering their courage for what has to come.";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_Put up your blade, brigand._";
	text1 = "He only watches you. He stops trying to talk. None of his companions say anything either. They concentrate on gathering their courage for what has to come.";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "_I demand your surrender in the name of Haven._";
	text1 = "He only watches you. He stops trying to talk. None of his companions say anything either. They concentrate on gathering their courage for what has to come.";

begintalknode;
	state = 41;
	nextstate = 42;
	condition = 1;
	question = "_Well? Say something._";
	text1 = "He opens his mouth. Then he closes it again. Then he raises his blade and adopts a fighting stance. His will is close to failing, and the reflexes of battle drilled into him since he could walk take over.";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Just attack.";
	text1 = "Perhaps a decisive charge can cause them to panic and surrender. But no ... He raises his blade and adopts a fighting stance. His will is close to failing, and the reflexes of battle drilled into him since he could walk take over.";
	text2 = "He shouts, _I am Rezna of the Dhaga! I fight for the Ro!_ Then he steps forward ...";
	action = END_TALK;
	
begintalknode;
	state = 42;
	nextstate = 43;
	condition = 1;
	question = "_Spit it out._";
	text1 = "He raises his sword with a trembling hand. _I am Rezna of the Dhaga! I swore to ... to ... We did not think a [P] would be here yet. We expected the weak, soft Gentle Coast folk._";

begintalknode;
	state = 43;
	nextstate = 44;
	condition = 1;
	question = "_What did you think would happen?_";
	text1 = "_Nothing. The Gentle Coast has no Deep Truth. They are too soft to fight. We can take their land, their homes, and they have no will to respond. But Haven is here. So what must happen will happen._";
	text2 = "_We saw the shade following us. We suspected this would come. Now it is here._";

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_Shade? What shade?_";
	text1 = "_The shade of our true warriors. The shade of judgment. Or the end. You will see. Let's end this._";

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_My father was Ro. This is my land too. We don't need to fight._";
	text1 = "Rezna smiles. _You are no Ro. Ro is deep, deep within. You do not have this. If you did, I would be dead now. Or fighting by your side._";

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_Why did you come raid us in the first place?_";
	text1 = "_We tried to bring a message. We failed, but there will be others._ He shudders. _No. We can't take any more. We have to do it, before our courage fails._";
	text2 = "And then, before you can respond, they attack.";
	action = END_TALK;

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_You can surrender to me._";
	text1 = "For a moment, they consider it. For a few seconds, you have hope. Then Rezna smiles. _Yes. We passed the test. We have to do it, before our courage fails. Here is the message._";
	text2 = "And then, before you can respond, they attack.";
	action = END_TALK;

begintalknode;
	state = 44;
	nextstate = -1;
	condition = 1;
	question = "_Now you must accept your fate._";
	text1 = "_Yes. You show the resolve of the Rokaj. Now do it. Our time is done. Give us what we need and receive the message._";
	text2 = "And then, before you can respond, they attack.";
	action = END_TALK;

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = "Rezna falls to the ground, grievously wounded. He rolls from side to side, groaning. He looks up at you, and, for a moment, it seems like he might ask for mercy.";
	text2 = "Then he, with greatest difficulty, lies on his back and closes his eyes. There is a shudder, and he is still.";
	code =
		set_dialogue_pic(839);
	break;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "An impressive victory.";
	text1 = "You were in a foreign land, outnumbered and unprepared, and yet the lighthouse has been retaken. You have demonstrated the power of Haven. The Rokaj is a proud place, but Haven is mighty. You will prevail.";
	action = END_TALK;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "Coming here like this was reckless.";
	text1 = "It was a risk, but Haven takes risks. You are as willful and stubborn and proud as the Rokaj, but you are also mighty. You don't know what is happening yet, but you do know this: Haven will prevail.";
	action = END_TALK;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "I wish I was home.";
	text1 = "Staring at the young man's body, you feel overwhelmed and alone. Yet, you serve at the whim of the Queen. Your mother has absolute power, and she is as stubborn as any Ro.";
	text2 = "Until she is satisfied, you can never go home.";
	action = END_TALK;


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = "When you enter this hall, a shade confronts you. At first, it is an insubstantial, glowing form. Then it resolves into a translucent warrior of the Rokaj. He is old and tall, with an archaic spear and some sort of headdress.";
	text2 = "He raises his spear and points it at you, but he makes no move to attack.";
	code =
		clear_town(9);
		sf(9,11,1);
		award_party_xp(MED_QUEST_XP);
	break;
	
begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "_Die, monster!_ (Attack.)";
	text1 = "Your blow travels through his form without resistance. He's not a shade. He's a ghost. Shades are magical constructs that can kill you. He is an insubstantial spirit, here for his own mysterious purposes.";

begintalknode;
	state = 100;
	nextstate = 101;
	condition = 1;
	question = "_What do you want?_";
	text1 = "He begins to speak. His voice is deep, soft, and sounds like it is being sent from far away. _I bring a message from the Peaks. From the spirit of the Rokaj._";

begintalknode;
	state = 100;
	nextstate = 101;
	condition = 1;
	question = "Just wait.";
	text1 = "There is a long pause. You start to wonder if he even knows you are here. Then he begins to speak. His voice is deep, soft, and sounds like it is being sent from far away. _I bring a message from the Peaks. From the spirit of the Rokaj._";

begintalknode;
	state = 101;
	nextstate = 102;
	condition = 1;
	question = "_Yes?_";
	text1 = "As he speaks, the air starts to feel very cold. You shiver. _We charge you. You are unworthy._";

begintalknode;
	state = 102;
	nextstate = 103;
	condition = 1;
	question = "_And?_";
	text1 = "_The challenge has been issued. It will reach you, though they try to prevent it. You will no longer be our tormentors. You will answer to the Wolf._";
	code =
		sf(80,22,1);
	break;
	
begintalknode;
	state = 103;
	nextstate = -1;
	condition = 1;
	question = "_We'll see about that!_ (Attack.)";
	text1 = "Your blow travels through his form without resistance. He's not a shade. He's a ghost. Shades are magical constructs that can kill you. He is an insubstantial spirit, here for his own mysterious purposes.";

begintalknode;
	state = 103;
	nextstate = -1;
	condition = 1;
	question = "_The Wolf?_";
	text1 = "The ghost doesn't respond. It turns and floats through the closed door to the west. It passes through the wood, leaving a tracery of frost. Then it is gone.";
	action = END_TALK;

begintalknode;
	state = 103;
	nextstate = -1;
	condition = 1;
	question = "_Who sent you? Who challenges us?_";
	text1 = "The ghost doesn't respond. It turns and floats through the closed door to the west. It passes through the wood, leaving a tracery of frost. Then it is gone.";
	action = END_TALK;

begintalknode;
	state = 103;
	nextstate = -1;
	condition = 1;
	question = "_Perhaps things can be changed._";
	text1 = "The ghost doesn't respond. It turns and floats through the closed door to the west. It passes through the wood, leaving a tracery of frost. Then it is gone.";
	action = END_TALK;

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				